//
//  ViewController.m
//  UI
//
//  Created by dllo on 16/8/15.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "TwoViewController.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton *buuton = [[UIButton alloc] init];
    buuton.backgroundColor = [UIColor redColor];
    buuton.frame = CGRectMake(100, 100, 100, 100);
    [self.view addSubview:buuton];
    [buuton setTitle:@"点击下一页" forState:UIControlStateNormal];
    [buuton addTarget:self action:@selector(AAA:) forControlEvents:UIControlEventTouchUpInside];

    // Do any additional setup after loading the view, typically from a nib.
}
-(void)AAA:(UIButton *)buuton{
    TwoViewController *svc = [[TwoViewController alloc] init];
    
    UINavigationController *myVc = [[UINavigationController alloc] initWithRootViewController:svc];
    
    [self presentViewController:myVc animated:YES completion:nil];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
